<table  class="table table-striped table-bordered table-hover" width="100%">
	   <thead>
			<tr>
				 <th colspan="2"><?php echo __('Books.data');?></th>
				 <th colspan="2"><?php echo __('Books.Pay_type 1');?></th>
				 <th colspan="2"><?php echo __('Books.Pay_type 2');?></th>
				 <th colspan="1"><?php echo __('Balance');?></th>
			     <th><div class="th-inner"><a href="javascript:;" class="btn btn-success btn-xs btn-toggle" title="展开所有"><i class="fa fa-chevron-up"></i></a></div><div class="fht-cell"></div></th>
			</tr>
	   </thead>
	   <tbody>
	   <?php if(!empty($WeekInfo[$key])){?>
			<?php foreach($WeekInfo[$key] as $k=>$v){?>
			
					<tr style="background-color: #edf1ee;">
						<td colspan="2"><?php echo date('Y-m-d',strtotime(TableField('Week','start_time',$v['extract_week'])." +".$v['day']." day"));?></td>
						<td colspan="2"><?php echo $v['income'];?></td>
						<td colspan="2"><?php echo $v['expenditure'];?></td>
						<td colspan="1"><?php echo GetBookBalance($v['extract_week'],$v['day']);?></td>
						<td >
							<!-- <a href="javascript:;" data-toggle="tooltip" title="" data-id="231" data-pid="0" class="btn btn-xs btn-success btn-node-sub" data-original-title="点击展示"><i class="fa fa-sitemap"></i></a> -->
							<!-- <a href="javascript:;" onclick="view(<?php echo $id;?>,'<?php echo $key,'_view';?>','<?php echo $v['day'];?>')" title="查看详情" class="btn btn-primary btn-success btn-detail"><i class="fa fa-camera"></i>&nbsp;查看详情</a> -->
							<a href="javascript:;" data-toggle="tooltip" title="" data-id="<?php echo $v['day']?>" data-pid="0" title="点击查看" class="btn btn-primary btn-success btn-node-sub"><i class="fa fa-sitemap"></i>&nbsp;点击查看</a>
						</td>
					</tr>
					<?php if(isset($v['Books_view'])){?>
					<tr style="display:none;"  >
						 <th><?php echo __('Books.Number');?></th>
					
						 <th><?php echo __('Books.Cost_id');?></th>
						 <th><?php echo __('Books.Pay_type 1');?></th>
						 <th><?php echo __('Books.Pay_type 2');?></th>
						 <th><?php echo __('Books.Abstract');?></th>
						 <th><?php echo __('Books.Sign');?></th>
						 <th><?php echo __('Desc');?></th>
						 <th ><?php echo __('Operate');?><a href="javascript:;" style="display:none;" data-toggle="tooltip" class="btn-node-sub disabled" data-id="<?php echo $k+1;?>" data-pid="<?php echo $v['day']?>"></a>
						 </th>
					</tr>
				<!-- 	<a href="javascript:;" data-toggle="tooltip" title="点击切换子菜单" data-id="232" data-pid="231" class="btn btn-xs btn-default disabled btn-node-sub"><i class="fa fa-sitemap"></i></a> -->
					<?php foreach($v['Books_view'] as $vv){?>
						<tr style="display:none;" >
						<td><?php echo $vv['number'];?></td>
						
						<td><?php echo !empty($vv['cost_id']) && $vv['pay_type'] == 2 ? TableField('Cost','name',$vv['cost_id']) : '-';?></td>
						<?php if($vv['pay_type'] == 1){ ?>
							<td><?php echo $vv['price'];?></td>
							<td></td>
						<?php }else{ ?>
							<td></td>
							<td><?php echo $vv['price'];?></td>
						<?php }?>
						
						<td><?php echo $vv['abstract'];?></td>
						<td><?php echo $vv['sign'];?></td>
					<!-- 	<td><?php echo __('Books.Status '.$vv['status'].'');?></td> -->
						<td><?php echo $vv['desc'];?></td>
						<td>
						<a href="javascript:;" style="display:none;" data-toggle="tooltip" class="btn-node-sub disabled" data-id="<?php echo $k+1;?>" data-pid="<?php echo $v['day']?>"></a>
							<?php if(isset($WeekModel['Score']['Books']['edit'])){ ?>
								<a href="javascript:;" class="btn btn-primary btn-xs" onclick="edit(<?php echo $vv['id'];?>,'Books')" title="修改"><i class="fa fa-edit"></i>&nbsp;修改</a>
							<?php }?>
							<?php if(isset($WeekModel['Score']['Books']['delete'])){ ?>
								<a href="javascript:;" onclick="del(<?php echo $vv['id'];?>,'Books')" title="删除" class="btn btn-danger btn-xs"><i class="fa fa-remove"></i>&nbsp;删除</a>
							<?php }?>
						</td>
					</tr>
					
					<?php } ?>
					
				 <?php }?>
			 <?php }?>
		 <?php }?>
	   </tbody>
	
</table>